<?php
/**
* @package readerTemplate
* @author Jan Papousek
* @copyright Jan Papousek 2007
* @link http://ctenar.cz
*/
/**
* Box s uzivateli, kteri si danou knihu chteji precist.
* @package readerTemplate
*/
class WantReadListBox extends Div {
	
	public function __construct($book) {
		parent::__construct();
		$this->setClass("column");
		$this->addValue(new H(2,new String(Lng::BOOK_WANT_READ)));
		$res = ReadList::getListByBook($book);
		$p = new P();
		while ($row = mysql_fetch_object($res)) { 
			$item = new A(
				$row->name,
				"user.php?user=".$row->userID,
				$row->name
			);
			$p->addValue($item);
		}
		$this->addValue($p);
	}
}
?>